package model

type ProductType struct{
	Id int32 `gorm:"primary_key:id"`
	Name string 
}

type Product struct{
	Id int32 `gorm:"primary_key:id"`
	Name string 
	Type ProductType `gorm:"ForeignKey:TypeId;AssociationForeignKey:Id"`
	TypeId int32
}

type ProjectType struct{
	Id int32 `gorm:"primary_key:id"`
	Name string 
}

type Project struct{
	Id int `gorm:"primary_key:id"`
	Name string
	Type ProjectType `gorm:"ForeignKey:TypeId;AssociationForeignKey:Id"`
	TypeId int32
}

type Meal struct{
	Id int32 `gorm:"primary_key:id"`
	Name string 
	ProjectList []*Project `gorm:"many2many:meal_projects;"`
	ProductList []*Product `gorm:"many2many:meal_products;"`
}

type Member struct{
	Id int32 `gorm:"primary_key:id"`
	Name string 
	Meallist []*Meal `gorm:"many2many:member_meals;"`
}

type Student struct{
	Id string
	Name string
	Birth string
	Sex string
}
